home *** CD-ROM | disk | FTP | other *** search
- global gGlobalStepCount, gInputField, gModeState, gTickSND, gCurrEntryAttrib, gLocalStepCount, oIndexMediator, gIndxScrollFldK, oSLlookup, oIndexScroller, oTextScroller, gLastYearK, gFirstYearK, gdescfield, gAlphaState
-
- on hPlaceEntryRequest pDir
- global gNopeSND
- if the text of field "BltIndexWin1" = " " then
- hearit(gNopeSND)
- abort()
- end if
- hIncrementStep(pDir)
- hMiniFind()
- if gModeState = #CHRO then
- mChroPicDispTest(oTextScroller, 1)
- end if
- end
-
- on hIncrementStep pDir
- global mouseUp, gNopeSND
- hSetGlobalCounter(gGlobalStepCount + pDir)
- if gGlobalStepCount = 0 then
- hSetGlobalCounter(1)
- hearit(gNopeSND)
- abort()
- end if
- if gModeState <> #EPISSUB then
- if pDir > 0 then
- if gGlobalStepCount > mGetModesMaxEntryNum(oIndexMediator) then
- hSetGlobalCounter(mGetModesMaxEntryNum(oIndexMediator))
- hearit(gNopeSND)
- hReportStatus("That is the last entry in this index.")
- abort()
- end if
- if not (gModeState = #FoundSet) and not (gModeState = #Resources) and not (gModeState = #TOPICS) then
- if hIsAfterCurrList() then
- hSwapToNextList()
- end if
- end if
- else
- if gGlobalStepCount < 1 then
- hSetGlobalCounter(1)
- end if
- if not (gModeState = #FoundSet) and not (gModeState = #Resources) and not (gModeState = #TOPICS) then
- if hIsBeforeCurrList() then
- hSwapToPriorList()
- end if
- end if
- end if
- mConvertGlobaltoLocal(oIndexMediator)
- else
- hSetLocalCounter(gGlobalStepCount)
- if gLocalStepCount > the iIndexLength of oIndexScroller then
- hSetLocalCounter(the iIndexLength of oIndexScroller)
- hearit(gNopeSND)
- hReportStatus("That is the last entry in the index for this series.")
- abort()
- end if
- end if
- if gLocalStepCount > mGetModesMaxEntryNum(oIndexMediator) then
- set gLocalStepCount to 1
- end if
- set LxNtry to getPropAt(mGrabCurrAttrList(oIndexMediator, gModeState), gLocalStepCount)
- if not (gModeState = #FoundSet) then
- put LxNtry into field gInputField
- else
- put mSetOneFTfromLU(oSLlookup, gGlobalStepCount) into field gInputField
- end if
- hilite char 999 of field gInputField
- end
-
- on hCreateIndexObjs
- global oIndexScroller, oIndexMediator, oSLlookup, oTextScroller
- set oIndexMediator to birth(script "MultiIndex Manager")
- go("OpC4")
- hearit(gBtnHitSND)
- set oSLlookup to birth(script "ShortLong Lookup")
- mPrepEntryLookup(oSLlookup)
- go("OpD1")
- hAnnounce("Memory Alpha")
- set oIndexScroller to birth(script "indexmaker", #E, 7, 1)
- set oTextScroller to birth(script "Scroll Manager")
- end
-
- on hCapitalize pCharstoCap
- if not voidp(value(pCharstoCap)) and (value(pCharstoCap) < 65) then
- return pCharstoCap
- end if
- set vCharNum to charToNum(pCharstoCap)
- if vCharNum > 96 then
- return numToChar(vCharNum - 32)
- else
- return pCharstoCap
- end if
- end
-
- on hCapAsNum pCharstoCap
- if not voidp(value(pCharstoCap)) and (value(pCharstoCap) < 65) then
- return pCharstoCap
- end if
- set vCharNum to charToNum(pCharstoCap)
- if vCharNum > 96 then
- return vCharNum - 32
- else
- return vCharNum
- end if
- end
-
- on hInitCap pWord
- put hCapitalize(char 1 of pWord) into char 1 of pWord
- return pWord
- end
-
- on hConvertListtoString pTheList, pType
- set Lme to string(pTheList)
- if pType = 1 then
- set Lsz to the number of chars in Lme
- delete char Lsz of Lme
- else
- if pType >= 2 then
- set Lsz to the number of chars in Lme
- delete char Lsz of Lme
- put "," into char 1 of Lme
- else
- if pType = 0 then
- end if
- end if
- end if
- return Lme
- end
-
- on hAddOnetoMe pVar
- set pVar to hConvertAlphaToItem(pVar)
- if gModeState = #CHRO then
- if pVar >= gLastYearK then
- return string(value(pVar))
- else
- return string(value(pVar) + 1)
- end if
- else
- if pVar >= 90 then
- return hConvertItemtoAlpha(pVar)
- else
- return hConvertItemtoAlpha(pVar + 1)
- end if
- end if
- end
-
- on hSubtractOnefromMe pVar
- set pVar to hConvertAlphaToItem(pVar)
- if gModeState = #CHRO then
- if pVar <= gFirstYearK then
- return string(value(pVar))
- else
- return string(value(pVar) - 1)
- end if
- else
- if pVar <= 1 then
- return hConvertItemtoAlpha(pVar)
- else
- return hConvertItemtoAlpha(pVar - 1)
- end if
- end if
- end
-
- on hMatchTbarToWindow
- global oINTERfaceUpdate, oCHROPopup2, oCHROPopup1, oINTERfaceAlph, oINTERfaceEpis, oIndexScroller
- if gModeState = #ENCY then
- mHltfromScripts(oINTERfaceAlph, mGrabCurrItem(oIndexMediator))
- else
- if gModeState = #EPISSUB then
- mHltfromScripts(oINTERfaceEpis, mGrabCurrItem(oIndexMediator))
- else
- if gModeState = #EPIS then
- mHltfromScripts(oINTERfaceEpis, 6)
- else
- if gModeState = #CHRO then
- mHltfromScripts(oCHROPopup1)
- mHltfromScripts(oCHROPopup2)
- else
- if gModeState = #FoundSet then
- set Lwhichbutt to hMatchButtToType(mWhatFSlistType(oIndexScroller))
- mHltfromScripts(oINTERfaceUpdate, Lwhichbutt)
- end if
- end if
- end if
- end if
- end if
- hSysAlert(#LCARSREADY)
- hWinVoiceMicOn()
- end
-
- on hShowEmbeddedHits
- if gModeState = #FoundSet then
- if mWhatFSlistType(oIndexScroller) = 1 then
- set theitems to mGetThisEntrysAttribs(oIndexMediator, #FoundSet, 1, gLocalStepCount)
- if theitems = 0 then
- exit
- end if
- set tidl to the itemDelimiter
- set the itemDelimiter to ","
- set k to the number of items in string(theitems)
- repeat with n = 1 to k
- set the textStyle of word value(item n of string(theitems)) of field gdescfield to "underline"
- end repeat
- set the itemDelimiter to tidl
- end if
- hSysAlert(#LCARSREADY)
- hWinVoiceMicOn()
- end if
- end
-
- on hSwapToNextList
- hGetNewAttrList(hAddOnetoMe(gAlphaState), 0)
- end
-
- on hSwapToPriorList
- hGetNewAttrList(hSubtractOnefromMe(gAlphaState), 0)
- end
-
- on hIsAfterCurrList
- if gGlobalStepCount > mGetMyLastEntryNum(oIndexMediator, gAlphaState) then
- return 1
- else
- return 0
- end if
- end
-
- on hIsBeforeCurrList
- if gGlobalStepCount > mGetMyFirstGroupLimit(oIndexMediator) then
- set Lprevitem to hSubtractOnefromMe(gAlphaState)
- if gGlobalStepCount <= mGetMyLastEntryNum(oIndexMediator, string(Lprevitem)) then
- return 1
- else
- return 0
- end if
- else
- return 0
- end if
- end
-
- on hSwitchBacktoEpis
- set LmyfldName to "A"
- set Lnum to 1
- hSetMode(#EPIS)
- hGetNewAttrList(LmyfldName, 0)
- set vIndexLength to mGetModesMaxEntryNum(oIndexMediator)
- mReDefineSlider(oIndexSlider, 1, vIndexLength - 6, 1)
- mSetSlider(oIndexSlider, 1)
- mShiftWindowToEntry(oIndexScroller, Lnum, 0)
- end
-
- on hSwitchtoSomeNewList
- hGetNewAttrList("A", 0)
- mShiftWindowToEntry(oIndexScroller, 1, 1)
- end
-
- on hDragCHROtextBar
- global oCHROTextSlider, oIndexScroller
- set vloc to the mouseV
- set vloc to the mouseH
- mSlideSlider(oCHROTextSlider)
- repeat while the stillDown
- mSlideSlider(oCHROTextSlider)
- end repeat
- mEndIndexToLine(oIndexScroller)
- hIndexClick(3)
- end
-